package com.ruoyi.app.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * @author 侯存路
 * @description 购买订单表
 * @since 2020/10/22 16:38
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_order")
public class Order extends Model<Order> {

    /**
     * uuid
     */
    @TableId(value = "order_id", type = IdType.INPUT)
    private String orderId;

    /**
     * 用户标识
     */
    @TableField("user_id")
    private String userId;

    /**
     * 套餐Id
     */
    @TableField("package_id")
    private String packageId;

    /**
     * 支付金额（元）
     */
    @TableField("money")
    private double money;

    /**
     * 支付类型
     * 0微信 1支付宝
     */
    @TableField("pay_type")
    private String payType;


    /**
     * 检测时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
